<template>
	<view>
		<view class="content">
			<view class="head">
				<view class="swiper">
					<swiper bindchange="onBindchange">
						<block v-for="(item,index) in swiper" :key="index">
							<swiper-item :data-id="index">
								<!-- <video wx:if="{{swiperId==0}}" id="myVideo" src="{{item}}" controls autoplay="{{true}}"></video> -->
								<image id="merchandise" mode="aspectFit"
									:src="[item!=''?item:'../../../../image/errorImage.jpg']"></image>
							</swiper-item>
						</block>
					</swiper>
				</view>

				<view class="explain type3">
					<view class="explain-v1">
						<text>砍价</text>
						<text>限时砍价 超值低价</text>
					</view>
				</view>
				<view class="participate">
					<view class="select-title">
						<text>{{bargainData.FName}}</text>
						<button class="select-partic" open-type="share" hover-class="none">
							<image id="participate" src="http://minipos.posyun3721.com/image/marketing/participate.png">
							</image>
							<text>分享</text>
						</button>
					</view>
					<view class="select-price">
						<view class="price">
							<view class="amount">
								<text>¥<text class="money">{{bargainData.FValue}}</text></text>
								<text>原价:¥{{bargainData.FPosPrice}}</text>
							</view>
							<view class="">

							</view>
						</view>
						<view class="select-people">
							<view class="people">
								<image class="people-img"
									src="http://minipos.posyun3721.com/image/marketing/surplus.png"></image>
								<text>剩余:{{residuals}}份</text>
							</view>
							<view class="people">
								<image class="people-img"
									src="http://minipos.posyun3721.com/image/marketing/people-img2.png"></image>
								<text>浏览:{{browse}}人</text>
							</view>
							<view class="people">
								<image class="people-img" src="http://minipos.posyun3721.com/image/marketing/user.png">
								</image>
								<text>参与:{{participate}}人</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="spell">
				<view class="imageBox" v-if="uid==''">
					<image class="select-portrait" v-for="(item,index) in usetsArr" :key="index" :src="item.FAvatarUrl">
					</image>
				</view>
				<view class="imageBox" v-else>
					<image class="select-portrait" :class="uid==item.FItemID?'':'none'" v-for="(item,index) in usersImg"
						:key="index" :src="item.FAvatarUrl"></image>
				</view>
				<text v-if="share==0&&userprice!=0" class="userT">已砍价{{usersPrice}}元，剩余{{userprice}}%</text>
				<text v-if="share==0&&userprice==0" class="userT">订单已完成</text>
				<!-- <text wx:if="{{share==0}}" class="userT {{usersPrice==item.FAvatarUrl?'none':''}}">该活动已砍价成功</text> -->
				<view :class="[share!=0&&childSet[0].Status!='成功'?'':'none']">
					<text v-if="activiStatus!='不可用'">{{id==2?'砍价':''}}时间剩下<text class="time">{{days}} 天 {{hours}} 时
							{{minutes}} 分 {{seconds}} 秒</text>后结束</text>
				</view>
				<view v-if="share==1">
					<button class="type3" id="immediately" v-if="activiStatus!='不可用'&&userID==0" @click="onStart"
						vlaue="">发起砍价</button>
					<button class="type3" id="immediately" v-else-if="activiStatus!='不可用'&&userID==1" open-type="share"
						hover-class="none">邀请砍价</button>
					<button class="type3" id="immediately" v-else-if="activiStatus!='不可用'&&userID==2"
						@click="onWay">去支付</button>
					<button class="type3" id="immediately" v-else>活动已结束</button>
				</view>
				<view v-else>
					<button class="type3" id="immediately" @click="onChilds" v-if="activiStatus!='不可用'&&userInfoId==0"
						vlaue="">帮忙砍一刀</button>
					<button class="type3" id="immediately" v-else-if="activiStatus!='不可用'&&userInfoId==1&&userprice!=0"
						vlaue="">已帮忙砍价</button>
					<button class="type3" id="immediately" v-else-if="activiStatus!='不可用'&&userInfoId==1&&userprice==0"
						vlaue="">订单已完成</button>
				</view>
			</view>
			<view class="select-other" :class="[childSet==''?'none':'']" v-if="share==1">
				<view class="other-head" @click="onFind" v-if="activiStatus!='不可用'">
					<text>{{participate}}人在参与</text>
					<text class="none">查看更多></text>
				</view>
				<view class="other-box" :class="(item.GroupQty-item.ActQty)==0?'none':''"
					v-for="(item,index) in childSet" :key="index" :data-id="item.Childid" @click=""
					v-if="activiStatus!='不可用'">
					<view class="initiator">
						<image class="initiator-img" :src="item.FAvatarUrl"></image>
						<text>{{item.FNiName}}</text>
					</view>
					<view class="part">
						<text v-if="id==2">本次砍价还差<text class="time">{{item.ActAmt}}</text>元完成</text>
						<!-- <button class="part-btu">去砍价</button> -->
					</view>
				</view>
			</view>
			<view v-else>
				<view class="other-box" v-for="(item,index) in usetsArr" :key="index" :data-id="item.Childid">
					<view class="initiator">
						<image class="initiator-img" :src="item.FAvatarUrl"></image>
						<text>{{item.FNiName}}</text>
					</view>
					<view class="part">
						<text class="time">帮砍{{item.price}}元</text>
					</view>
				</view>
			</view>

			<view class="select-other none" v-if="share==1">
				<view class="other-head">
					<text>用户评价（115）</text>
					<text style="color: #333;">99.6%好评></text>
				</view>
				<view class="other-box">
					<view class="evaluation">
						<image class="evaluation-img" src=""></image>
						<text>cingcing</text>
						<text>2019.07.04</text>
					</view>
					<text>每次搞活动都过来这家抢，非常划算！</text>
				</view>
			</view>
			<view class="activity" v-if="share==1">
				<view class="activity-head" @click="onSwitch">
					<text class="activity-text" :class="[activityTypeID==0?'active1':'']" data-id="0">活动详情</text>
					<text class="activity-text" :class="[activityTypeID==1?'active1':'']" data-id="1">活动规则</text>
				</view>
				<view class="activity-content">
					{{text}}
				</view>
			</view>
			<!-- <view class="footer Footer" wx:if="{{share==1}}">
    <view class="page-footer">
      <image class="footer-img" src="http://minipos.posyun3721.com/image/marketing/loog.png"></image>
      <text>商拓软件提供技术支持</text>
    </view>
  </view> -->

			<view class="buy" v-if="share==1">
				<view class="buy-choose">
					<!-- <navigator hover-class="none" url="/pages/Marketing/index/index" open-type="switchTab"> -->
					<view class="buy-view" @click="onIndex">
						<image class="buy-img" src="http://minipos.posyun3721.com/image/marketing/index1.png"></image>
						<text>首页</text>
					</view>
					<!-- </navigator> -->
					<view class="buy-view" @click="collect">
						<image class="buy-img" :src="img"></image>
						<text>收藏</text>
					</view>
				</view>
				<view class="buy-button type3">
					<!-- <text class="bb-text" wx:if="{{activiStatus!='不可用'&&userID==0}}" @click="onStart">发起砍价</text>
      <text class="bb-text" wx:elif="{{activiStatus!='不可用'&&userID==1}}" open-type="share" hover-class="none">邀请砍价</text>
      <text class="bb-text" wx:else>活动已结束</text> -->
					<button class="type3" id="" v-if="[activiStatus!='不可用'&&userID==0]" @click="onStart"
						vlaue="">发起砍价</button>
					<button class="type3" id="" v-else-if="[activiStatus!='不可用'&&userID==1]" open-type="share"
						hover-class="none">邀请砍价</button>
					<button class="type3" id="" v-else-if="[activiStatus!='不可用'&&userID==2]" @click="onWay">去支付</button>
					<button class="type3" id="" v-else>活动已结束</button>
				</view>
			</view>
			<view class="service none" v-if="share==1">
				<text>客服</text>
			</view>
		</view>

		<image class="music" :class="[musicUrl===''?'none':'']" id="musicUrl" src="../../../../Marketing/images/music.gif"
			mode='aspectFill' @click="onMusic"></image>

		<!-- <view class="modal" :class="[isBeGranted==0?'':'none']">
			<view class="title1">申请获取您的用户信息</view>
			<button class="btn" open-type="getUserInfo" bindgetuserinfo="getUserInfo">确定</button>
		</view> -->
		<!-- <view class="mask" :class="[isBeGranted==0?'':'none']"></view> -->

		<dialog :class="[FPhone==0?'':'none']" id='dialog' bind:confirmEvent='confirmEvent'
			bind:bindgetphonenumber='bindgetphonenumber'>
		</dialog>
	</view>
</template>
<script>
	const innerAudioContext = uni.createInnerAudioContext();

	let bargainChildId = '', //子活动的id
		bargainacid = '', //活动id
		usersData = '', //参活动的用户的内容
		tiemDate = '', //活动结束的时间
		coll = true; // 
	export default {
		data() {
			return {
				id: 0, //活动的3种模式；0=> 拼团 1=> 秒杀 2=> 砍价 //底部导航按钮的2种模式;1=>秒杀模式 2=>砍价模式
				share: 1, //是否是分享链接进来的
				AcChild: 0, //子类活动查询,加入子拼团
				uid: '', //分享人的id
				isBeGranted: 1, //授权登录状态码
				FPhone: 1, //
				activityTypeID: 0, //活动类型的样式 0=>活动详情 1=>活动规则
				days: 0, //时间
				hours: 0,
				minutes: 0,
				seconds: 0,
				bargainData: '', //主活动内容
				childSet: '', //子活动的内容
				residuals: '', //剩余数量
				browse: '', //浏览人数
				participate: '', //参与人数
				activiStatus: '',
				text: '', //活动规则和活动说明
				swiper: [], //图片
				usersPrice: '', //
				userID: '', //
				usersImg: '',
				userprice: '', //
				userInfoId: 0, //当前用户是否已帮忙砍价
				usersActAmt: 0, //
				img: 'http://minipos.posyun3721.com/image/marketing/collect1.png', //
				distributor: '', //分销人员id
				musicUrl: '', //背景音乐地址
				musics: true, //背景音乐播放的状态
				TimeOut: '', //定时器
			}
		},
		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad: function(options) {
			//console.log('options', options)
			// wx.setStorageSync('CurrentPage', options)
			//记录0=>主页 1=>详情页
			uni.setStorageSync('Recordid', 1);
			//记录该活动时间是否已过期
			uni.removeStorageSync('timeOut');
			uni.showLoading({
				title: '加载中......',
			})

			var self = this;
			if (options) {
				if (options.AcChild) {
					bargainChildId = options.ChildId;
					bargainacid = options.Acid;
					this.id = options.id;
					this.AcChild = options.AcChild;
					this.distributor = options.distributor;
					this.callback(2);
				} else {
					if (options.share == 0) {
						let shar = options.Sharedata;
						if ((typeof shar) == 'string') {
							shar = JSON.parse(shar);
						}
						let option = {
							FItemID: shar.fItemID,
							stockId: shar.fItemID,
							hostid: shar.hostid,
							PagePath: 'Marketing'
						};
						uni.setStorageSync('options', option);
						uni.setStorageSync('Sharedata', options.Sharedata);
						//console.log(shar);
						if (shar.uid != '') {
							bargainChildId = shar.childId;
							bargainacid = shar.groupId;
							this.id = shar.id;
							this.share = options.share;
							this.uid = shar.uid;
							this.distributor = shar.distributor;
							this.AcChild = 1;
						} else {
							bargainacid = shar.groupId;
							this.id = shar.id;
							this.share = 1;
						}

						uni.setStorageSync('stockId', shar.fItemID);
						uni.setStorageSync('FItemID', shar.fItemID); //门店id
						uni.setStorageSync('lastHostid', shar.hostid); //旧的
					} else {
						let shar = '';
						if (options.Sharedata) {
							shar = options.Sharedata;
							shar = JSON.parse(shar); //分享链接传递过来的参数
						}
						let option = {
							FItemID: shar.fItemID,
							stockId: shar.fItemID,
							hostid: shar.hostid,
							PagePath: 'Marketing'
						};
						uni.setStorageSync('stockId', shar.fItemID);
						uni.setStorageSync('options', option);
						if (shar.distributor !== undefined) {
							bargainacid = shar.groupId;
							this.id = shar.id;
							this.distributor = shar.distributor;
							this.share = 1;
						} else {
							bargainacid = options.groupId;
							this.id = options.id;
							this.share = 1;
						}
					}
					var loginId = uni.getStorageSync('LoginID');
					if (loginId == 1) {
						let ID = this.share == 0 ? 2 : 1;
						this.callback(ID);
					} else {
						uni.login({ //登录
							success: res => {
								let code = res.code;
								this.$util.Login(code).then(res => {
									if (res == 1) {
										let id = uni.getStorageSync('isBeGranted');
										this.isBeGranted = id;
										let ID = this.share == 0 ? 2 : 1;
										this.callback(ID);
									} else {
										this.isBeGranted = 0;
									}
								}).catch(error => {
									//console.log(error);
								});
							}
						})
					}
				}
			}
		},
		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow: function() {
			var loginId = uni.getStorageSync('LoginID');
			if (loginId == 1) {
				var phoneID = uni.getStorageSync('PhoneID');
				this.FPhone = phoneID;
			}
		},

		/**
		 * 生命周期函数--监听页面隐藏
		 */
		onHide: function() {
			if (this.musics === true) {
				this.musics = !this.musics;
			}
			//离开当前页面时，把wx.createInnerAudioContext()的实例去掉/销毁
			innerAudioContext.stop();
		},

		/**
		 * 生命周期函数--监听页面卸载
		 */
		onUnload: function() {
			//离开当前页面时，把wx.createInnerAudioContext()的实例去掉/销毁
			innerAudioContext.destroy();
			clearTimeout(this.TimeOut);
		},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh: function() {
			let ID = this.share == 0 ? 2 : 1;
			if (ID == 1 && this.AcChild == 1) {
				ID = 2;
			}
			this.callback(ID);
			// 处理完成后，终止下拉刷新
			uni.stopPullDownRefresh();
		},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {
			let Sharedata = '',
				share = Sharedata.share;
			Sharedata = this.$util.onShare();
			//添加分销人员的id
			if (this.distributor != '') {
				Sharedata.distributor = this.distributor;
			} else {
				Sharedata.distributor = '';
			}
			//定位子活动的发起人id
			let childSet = this.childSet;
			for (var i in childSet) {
				if (Sharedata.childId == childSet[i].Childid) {
					Sharedata.uid = childSet[i].Uid;
				}
			}
			//判断当前活动是否已经成功
			if (this.userprice == 0) {
				Sharedata.uid = '';
				Sharedata.childId = '';
			}
			if (Sharedata.childId != '') {
				share = 0;
			}
			//console.log(Sharedata, share)

			Sharedata = JSON.stringify(Sharedata);
			return {
				title: '快来帮我砍价吧',
				path: '/pages/Marketing/index/select/select3/select3?Sharedata=' + Sharedata + '&share=' + share,
			}
			// return {
			// 	title: '快来帮我砍价吧',
			// 	path: '/pages/Marketing/index/select/select3/select3?Sharedata=' + Sharedata + '&share=' + share,
			// }
		},
		methods: {

			//活动详情
			callback: async function(id) {
				this.$util.GetTitle();
				let url = '',
					data = {},
					userprice = 0,
					userInfoId = '',
					usersActAmt = '',
					Bargaingroup = {
						AcChild: this.AcChild,
						id: this.id,
						uid: this.uid,
						activityTypeID: this.activityTypeID,
						share: this.share,
					};
				if (id == 1) {
					url = 'Sale/GetCutPriceDtl';
					data = {
						acid: bargainacid
					};
				} else if (id == 2) {
					url = 'Sale/CutPriceChildDtl';
					data = {
						acid: bargainacid, //活动id
						childid: bargainChildId //子砍价id
					}
				}
				let Bargaindata = await this.$util.add(url, data, Bargaingroup);
				//console.log(Bargaindata);

				if (Bargaindata.Usets != '') {
					let childUserData = await this.$util.childUser(Bargaindata.Usets);
					//console.log(childUserData);
					if (this.share == 0) {
						//低价
						let price1 = Math.round((Bargaindata.goodsData.FValue / Bargaindata.goodsData.FPosPrice) *
							100);
						//砍价
						let price2 = Math.round((Bargaindata.usersPrice / Bargaindata.goodsData.FPosPrice) * 100);
						userprice = 100 - (price1 + price2);
						//console.log(price1, price2)
						let userInfo = uni.getStorageSync('MuserInfo')
						for (var i in childUserData.user) {
							if (userInfo.nickName == childUserData.user[i].FNiName) {
								userInfoId = 1;
							}
						}
					} else {
						if (Bargaindata.goodsData.FPosPrice > 0) {
							userprice = Bargaindata.goodsData.FPosPrice
						}
					}
					uni.setStorageSync('Uid', childUserData.userInfoUid);
					this.usersImg = childUserData.usersImg;
					this.usetsArr = childUserData.user;
					this.userID = childUserData.userID;
					this.userprice = userprice;
					this.userInfoId = userInfoId;
					this.distributor = childUserData.distributor;
				}
				let usersPrice = (Bargaindata.usersPrice + Bargaindata.goodsData.FValue).toFixed(2);

				uni.hideLoading();
				bargainChildId = Bargaindata.childId; //子活动的id
				bargainacid = Bargaindata.groupId; //团购id
				usersData = Bargaindata.usersData; //参活动的用户的内容
				tiemDate = Bargaindata.tiemDate; //活动结束的时间
				coll = Bargaindata.coll; //
				this.bargainData = Bargaindata.goodsData; //主活动内容
				this.childSet = Bargaindata.childSet; //子活动的内容
				this.residuals = Bargaindata.residuals; //剩余数量
				this.browse = Bargaindata.browse; //浏览人数
				this.participate = Bargaindata.participate; //参与人数
				this.activiStatus = Bargaindata.activiStatus;
				this.text = Bargaindata.text; //活动规则和活动说明
				this.swiper = Bargaindata.swiper; //图片
				this.usetsArr = Bargaindata.usetsArr; //
				this.usersPrice = usersPrice; //
				this.img = Bargaindata.collImg;
				setTimeout(() => {
					this.musicUrl = Bargaindata.FMusicUrl; //
					//自动播放背景音乐
					innerAudioContext.src = Bargaindata.FMusicUrl;
					innerAudioContext.autoplay = true;
					innerAudioContext.loop = true;
					innerAudioContext.play();
				}, 600)
				this.onCountdown(tiemDate);
			},

			//发起子拼团活动,先判断是否有填写地址，有则下一步，没有则需要去填写地址，才可以下一步
			onStart: function() {
				var self = this,
					datas = self.bargainData;
				datas = JSON.stringify(datas);
				let url = '';
				let data = {};
				//记录该活动时间是否已过期
				let timeOut = uni.getStorageSync('timeOut');
				if (timeOut == 1) {
					uni.showModal({
						title: '活动提示',
						content: '该活动已结束，请重新选择活动参与',
					})
				} else {
					//获取收货地址
					let token = uni.getStorageSync('Token'); //Token值
					uni.request({
						url: this.$Url + 'sale/CheckTokenLogin',
						data: '',
						method: 'POST',
						header: {
							'token': token,
							'cookie': uni.getStorageSync('Cookies'),
						},
						success: (res) => {
							let id = uni.getStorageSync('LoginID');
							if (res.data.msg == 'success' && id == 1) {
								
								if (this.id == 2) {
									url = 'Sale/CutPriceCreate';
									data = {
										acid: bargainacid,
										prowxid: self.distributor
									};
									this.ads(url, data);
								}
							}else{
								uni.showModal({
									title: '提示',
									content: '尚未登录，是否先前去登录',
									success: (res) => {
										if (res.confirm) {
											uni.navigateTo({
												url: `/pages/public/login`
											})
										}
									}
								})
							}
						}
					})

				}
			},


			//砍价、秒杀直接下单，订单成功之后才去支付
			ads: function(url, data) {
				let self = this;
				//请求
				this.$util.util(url, data, 'POST').then(res => {

					//console.log(res)
					//1秒杀，2砍价,0.1参加子拼团，0创建子拼团  
					if (res.status != 0) {
						uni.setStorageSync('Uid', res.uid);
						if (this.id == 2) {
							uni.showModal({
								title: '提示',
								content: '已参加活动，快邀请好友帮忙砍价吧',
								success: function() {
									self.callback(1);
								}
							})
						}
					} else {
						uni.showModal({
							title: '提示',
							content: res.msg,
						})
					}
				}).catch(error => {
					//console.log(error);
					if (error.errMsg == 'request:fail timeout') {
						// let currentData = wx.getStorageSync('CurrentPage');
						// this.onLoad(currentData);
					} else {
						uni.showToast({
							title: error.data.data,
							icon: 'none',
							duration: 2000,
						})
					}
				})
			},
			//子砍价的跳转
			onChilds: async function(e) {
				//朋友帮忙砍价
				let d = await this.$util(bargainChildId);
				//console.log(d);
				this.callback(2);
			},
			//去支付
			onWay: function() {
				let datas = this.bargainData;
				datas = JSON.stringify(datas);
				//创建子砍价
				uni.navigateTo({
					url: '/pages/Marketing/index/pay/pay?id=' + this.id + '&goodsData=' + datas +
						'&addressId=0&childId=' + bargainChildId + '&childType=0',
				})
			},

			//倒计时
			onCountdown: function(endDateStr) {
				var self = this;
				var data = this.$util.onCountdown(endDateStr);
				// //console.log(data);
				if (data != '') {
					this.days = data.days;
					this.hours = data.hours;
					this.minutes = data.minutes;
					this.seconds = data.seconds;
					if (data.type == 1) {
						clearTimeout(this.TimeOut)
					} else {
						//延迟一秒执行自己
						this.TimeOut = setTimeout(function() {
							self.onCountdown(endDateStr);
						}, 1000)
					}
				}
			},
			//暂停音乐
			onMusic() {
				if (this.musics === true) {
					innerAudioContext.pause(); //暂停音乐
				} else {
					innerAudioContext.play(); //暂停音乐
				}
				this.setData({
					musics: !this.musics
				})
			},

			//导航的切换
			onSwitch: function(e) {
				//console.log(e)
				let data = this.bargainData,
					id = e.target.dataset.id;
				let Text = id == 0 ? data.FIntro : data.FRuleIntro;
				this.activityTypeID = id;
				this.text = Text;
			},
			//分享链接进来，判断还没有授权的
			getUserInfo: function(e) {
				this.$util.getUserInfo().then(res => {
					if (res == 1) {
						uni.setStorageSync('isBeGranted', 1);
						uni.setStorageSync('LoginID', 1) //缓存登录的状态
						this.isBeGranted = 1;
						let ID = this.share == 0 ? 2 : 1;
						this.callback(ID);
					} else {
						uni.showModal({
							title: '授权提示',
							content: '授权失败！点击确认按钮，重新进入',
							success: res => {
								if (res.confirm) {
									this.isBeGranted = 0;
								}
							}
						})
					}
				}) //.catch(error=>//console.log(error));

			},
			//收藏
			collect: function() {
				var self = this;
				if (coll) {
					coll = false;
					self.img = 'http://minipos.posyun3721.com/image/marketing/collect2.png';
				} else {
					coll = true;
					self.img = 'http://minipos.posyun3721.com/image/marketing/collect1.png';
				}
				let goods = this.bargainData,
					goodsid = bargainacid,
					id = this.id,
					actype = '';
				id == 2 ? actype = 3 : '';
				if (coll == true) {
					this.$util.util('Sale/RemoveMemberCollect', {
						acid: goodsid, //活动id
						actype: actype, //活动类型
						goodsid: goods.FRangeExt, //商品id
					}, res => {
						//console.log(res);
					}).catch(error => {
						if (error.errMsg == 'request:fail timeout') {
							// let currentData = wx.getStorageSync('CurrentPage');
							// this.onLoad(currentData);
						}
					});
				} else {
					this.$util.util('Sale/SaveMemberCollect', {
						acid: goodsid, //活动id
						actype: actype, //活动类型
						goodsid: goods.FRangeExt, //商品id
						imgurl: goods.FImages, //商品图片
						title: goods.FName, //标题
					}, 'POST', res => {
						//console.log(res);
					}).catch(error => {
						if (error.errMsg == 'request:fail timeout') {
							// let currentData = wx.getStorageSync('CurrentPage');
							// this.onLoad(currentData);
						}
					});
				}
			},
			//返回首页
			onIndex: function() {
				uni.reLaunch({
					url: '/pages/Marketing/index/index',
				})
			},
			//获取手机号
			bindgetphonenumber: async function(e) {
				var self = this;
				let phoneData = e.detail.detail;
				let phoneID = await select.bindgetphonenumber(phoneData);
				//console.log(phoneID);
				self.FPhone = phoneID;
			},
		}
	}
</script>

<style lang='scss'>
	@import url("../../../../../common/app.wxss");

	view,
	scroll-view,
	swiper,
	swiper-item,
	cover-view,
	cover-image,
	icon,
	text,
	rich-text,
	progress,
	button,
	checkbox,
	form,
	input,
	label,
	radio,
	slider,
	switch,
	textarea,
	navigator,
	audio,
	camera,
	image,
	video {
		-webkit-box-sizing: border-box;
		box-sizing: initial;
	}

	.content {
		width: 100%;
		height: auto;
	}

	.head {
		width: 100%;
		height: auto;
		background-color: #fff;
		border-bottom: 20rpx solid #F6F6F6;
	}

	.userT {
		margin-bottom: 0px;
		font-size: 16px;
		display: block;
		text-align: center;
	}

	.music {
		position: fixed;
		top: 100rpx;
		right: 50rpx;
		width: 80rpx;
		height: 80rpx;
	}
</style>
